#ifndef __SHAPES_H
#define __SHAPES_H

#include "Types.h"
#include <stdbool.h>

typedef enum orientations { O_UP = 0, O_LEFT = 16, O_DOWN = 32, O_RIGHT = 48 } orientations_e;
typedef enum shapes { S_LINE, S_BOX, S_TEE, S_LEFT_L, S_RIGHT_L, S_LEFT_S, S_RIGHT_S } shapes_e;

#define SPRITE1 0x0840
#define SPRITE2 0x0880

extern byte_t _line[];
extern byte_t _tee[];
extern byte_t _box[];
extern byte_t _left_l[];
extern byte_t _right_l[];
extern byte_t _left_s[];
extern byte_t _right_s[];

extern byte_t sprites[0x0700];

void makeSprites(void);
void __fastcall__ buildSprite(byte_t *shapeDefinition);
bool drawShape(byte_t x, byte_t y, shapes_e shape, byte_t color, orientations_e orient, bool testRight, bool testLeft, bool testDown, bool finalize);

void __fastcall__ setSprite(byte_t *shape);

#endif